package edu.sctu.renpingan.day20150628alltest;

import org.apache.http.HttpEntity;

import java.io.IOException;
import java.io.Serializable;

/**
 * Created by Administrator on 2015/6/28.
 */
public class Connecting implements Serializable{
    /**
     * 逻辑处理
     * @throws IOException
     */
    public void connection() throws IOException, ClassNotFoundException {
        ThreaDutil threaDutil = new ThreaDutil();//使时间停止五秒
        threaDutil.run();
        Getinfo getinfo = new Getinfo();

        String string = getinfo.httpGet();//获取的json数据

        Ioutil ioutil = new Ioutil(string);//将获取的数据储存
        ioutil.saveInfo("D:\\Json\\Json.txt");

        JsonResolve jsonResolve = new JsonResolve();//对获取的json进行解析返回Appbean
        Appbean appbean = jsonResolve.getresolve(string);

        Appbean appbean0 = ioutil.saveentity(appbean,"D:\\Json\\Appbean.txt");//储存实体类并得到从文件里读取出来的实体类

        JudgePrice judgePrice = new JudgePrice();
       judgePrice.getGoodsNubmer(appbean0);
//        ioutil.getresolve();

    }

}
